<template>
  <div>
    <div class="brand">
      <img class="img" v-lazy="brandArr.list_pic_url" alt="" />
      <h2>{{ brandArr.name }}</h2>
      <div class="desc">{{ brandArr.simple_desc }}</div>
    </div>
  </div>
</template>

<script>
import { GetBrandDetail } from "../request/api";
export default {
  data() {
    return {
      brandArr: [],
    };
  },
  created() {
    GetBrandDetail({
      id: this.$route.query.id,
      //   route 本路径下
      // router跳转去别的路径
    }).then((res) => {
      if (res.errno === 0) {
        this.brandArr = res.data.brand;
      }
    });
  },
};
</script>
 
<style lang = "less" scoped>
.brand {
  background: #fff;
  position: relative;
  .img {
    width: 100%;
  }
  h2 {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    height: 30px;
    line-height: 30px;
    margin: 25% 0;
    font-size: 20px;
    text-decoration: underline;
    color: #fff;
  }
  .desc {
    font-size: 18px;
    text-align: center;
    padding: 20px 10px;
    line-height: 26px;
    color: #666;
  }
}
</style>